babl.git
8 years agofish-cache: fix cache path on linux
Victor Ananjevsky [Sun, 12 Mar 2017 19:01:38 +0000 (20:01 +0100)]
fish-cache: fix cache path on linux

make babl on linux honor $XDG_CACHE_HOME variable, falling back to using
$HOME/.cache

9 years agouse non gcc-specific floating point notation
Øyvind Kolås [Thu, 9 Feb 2017 11:46:55 +0000 (12:46 +0100)]
use non gcc-specific floating point notation

As reported in bug #778072 - HP UX ANSI C compiler refuses to compile
the shorthand floating point constant spec used by babl. Regenerated
file of constants by Richard Loyd <rkl@connect.org.uk>

9 years agobug #778071 improve portability to hp-ux native compiler
Øyvind Kolås [Thu, 9 Feb 2017 11:44:07 +0000 (12:44 +0100)]
bug #778071 improve portability to hp-ux native compiler

9 years agopost release version bump
Øyvind Kolås [Tue, 31 Jan 2017 23:34:33 +0000 (00:34 +0100)]
post release version bump

9 years agoconfigure.ac: 0.1.24 release
Øyvind Kolås [Tue, 31 Jan 2017 23:29:08 +0000 (00:29 +0100)]
configure.ac: 0.1.24 release

9 years agobabl: generate db in temporary file
Øyvind Kolås [Tue, 31 Jan 2017 23:02:42 +0000 (00:02 +0100)]
babl: generate db in temporary file

Fixing some of - but not all race conditions shown by concurrency stress test.

9 years agodocs: s/ftp/https/ and s/downloads/download/ on the download location.
Jehan [Sat, 28 Jan 2017 19:11:35 +0000 (20:11 +0100)]
docs: s/ftp/https/ and s/downloads/download/ on the download location.

9 years agodocs: update download location
Øyvind Kolås [Sat, 28 Jan 2017 19:04:24 +0000 (20:04 +0100)]
docs: update download location

9 years agoutil: add float versions of non optimized TRC functions
Øyvind Kolås [Fri, 13 Jan 2017 11:32:10 +0000 (12:32 +0100)]
util: add float versions of non optimized TRC functions

9 years agopow-24: use own inlined frexpf implementation
Øyvind Kolås [Fri, 13 Jan 2017 10:02:11 +0000 (11:02 +0100)]
pow-24: use own inlined frexpf implementation

Cannot beat sqrtf which can be an inlined instruction, but the function call
overhead of frexpf can be eliminated.

9 years agoextensions/CIE: do cbrt computation in single precision float
Øyvind Kolås [Fri, 13 Jan 2017 02:45:35 +0000 (03:45 +0100)]
extensions/CIE: do cbrt computation in single precision float

This is sufficient for our purposes, and gives a ~40% boost for
the affecte CIE Lab float conversions.

9 years agoextensions/CIE: use cbrtf from musl instead of libm
Øyvind Kolås [Fri, 13 Jan 2017 02:45:06 +0000 (03:45 +0100)]
extensions/CIE: use cbrtf from musl instead of libm

The inlining alone gives a ~6% performance boost.

9 years agoextensions/CIE: make some constants single precision float
Øyvind Kolås [Thu, 12 Jan 2017 20:39:11 +0000 (21:39 +0100)]
extensions/CIE: make some constants single precision float

Speeds up the 32bit float versions of conversions by a bit more than 5% without
changing the precision of 32bit floating point since the constants are of
similar magnitude to single precision IEEE float.

9 years agoextensions: enable a couple more simple float<->double paths
Øyvind Kolås [Tue, 3 Jan 2017 17:00:29 +0000 (18:00 +0100)]
extensions: enable a couple more simple float<->double paths

9 years agomake fish hashes less likely to fail
Øyvind Kolås [Sat, 31 Dec 2016 19:26:35 +0000 (20:26 +0100)]
make fish hashes less likely to fail

9 years agohash-table: simplify integer hashing
Øyvind Kolås [Sat, 31 Dec 2016 18:15:29 +0000 (19:15 +0100)]
hash-table: simplify integer hashing

9 years agoconfigure: make the f16c test for half-float instructions stricter
Øyvind Kolås [Fri, 16 Dec 2016 14:01:34 +0000 (15:01 +0100)]
configure: make the f16c test for half-float instructions stricter

9 years agoextensions/cairo: implement cairo display path from YA float
Øyvind Kolås [Fri, 16 Dec 2016 00:43:34 +0000 (01:43 +0100)]
extensions/cairo: implement cairo display path from YA float

9 years agoextensions/cairo: implement rgb8 to cairo32, speeding up RGB linear half display
Øyvind Kolås [Fri, 16 Dec 2016 00:01:43 +0000 (01:01 +0100)]
extensions/cairo: implement rgb8 to cairo32, speeding up RGB linear half display

9 years agoextensions: add fast paths going from gray to premul alpha rgb - for resampling
Øyvind Kolås [Thu, 15 Dec 2016 23:39:08 +0000 (00:39 +0100)]
extensions: add fast paths going from gray to premul alpha rgb - for resampling

9 years agotools/babl-verify: print the substeps of chosen paths
Øyvind Kolås [Thu, 15 Dec 2016 23:16:42 +0000 (00:16 +0100)]
tools/babl-verify: print the substeps of chosen paths

9 years agobabl-verify.sh: rm cache before running
Øyvind Kolås [Thu, 15 Dec 2016 22:01:02 +0000 (23:01 +0100)]
babl-verify.sh: rm cache before running

9 years agocairo: add fast paths for u8 and u16 gray gamma
Øyvind Kolås [Thu, 15 Dec 2016 20:01:45 +0000 (21:01 +0100)]
cairo: add fast paths for u8 and u16 gray gamma

9 years agobabl-fish-path: permit searching for one step longer fish paths
Øyvind Kolås [Thu, 15 Dec 2016 16:39:50 +0000 (17:39 +0100)]
babl-fish-path: permit searching for one step longer fish paths

but only if no BABL_PATH_LENGTH long or shorter valid paths were found,
this enables some desirable 16bit integer and floating point conversions.

9 years agobabl-verify.sh: add CIE Lab formats to verification
Øyvind Kolås [Thu, 15 Dec 2016 16:39:28 +0000 (17:39 +0100)]
babl-verify.sh: add CIE Lab formats to verification

9 years agobabl-verify.sh: only recompile extensions, not tools
Øyvind Kolås [Thu, 15 Dec 2016 15:43:07 +0000 (16:43 +0100)]
babl-verify.sh: only recompile extensions, not tools

9 years agotools: add shell script to aid in development of fast paths
Øyvind Kolås [Thu, 15 Dec 2016 15:40:28 +0000 (16:40 +0100)]
tools: add shell script to aid in development of fast paths

Added a shell script which takes a base format and profiles/debugs relevant
babl conversions for this format. The script recompiles the extensions
folder.

Usage:

$ babl ./tools/babl-verify.sh "RGBA half"

to get information about fast paths for half precision floating point, as
used by GEGL/GIMP.

9 years agotools/babl-verify: print selected fast path if a third argument is provided
Øyvind Kolås [Thu, 15 Dec 2016 15:40:02 +0000 (16:40 +0100)]
tools/babl-verify: print selected fast path if a third argument is provided

9 years agoextensions: implement bitshifting swizzlers for cairo/u8
Øyvind Kolås [Thu, 15 Dec 2016 12:03:10 +0000 (13:03 +0100)]
extensions: implement bitshifting swizzlers for cairo/u8

9 years agoextensions/sse2-float: add gamma and premul as single step
Øyvind Kolås [Thu, 15 Dec 2016 01:41:32 +0000 (02:41 +0100)]
extensions/sse2-float: add gamma and premul as single step

9 years agosse2-int8: permit converting premultiplied gamma RGBA
Øyvind Kolås [Thu, 15 Dec 2016 01:24:26 +0000 (02:24 +0100)]
sse2-int8: permit converting premultiplied gamma RGBA

9 years agoextensions/cairo: regain some lost speed for 32bit linear float display
Øyvind Kolås [Thu, 15 Dec 2016 01:08:46 +0000 (02:08 +0100)]
extensions/cairo: regain some lost speed for 32bit linear float display

9 years agoextensions/fast-float: temporarily disable
Øyvind Kolås [Thu, 15 Dec 2016 00:34:53 +0000 (01:34 +0100)]
extensions/fast-float: temporarily disable

Disable this floating point LUT for now, it treats negative values as their
positive counterparts, see bug #776113.

9 years agobabl: return tolerance to 0.000001
Øyvind Kolås [Tue, 13 Dec 2016 20:50:56 +0000 (21:50 +0100)]
babl: return tolerance to 0.000001

Smallest value printable with default %f printf format, conversions have been
iterated on sufficiently to crank up the precision again.

9 years agobabl: make missing fast path message explicit
Øyvind Kolås [Sun, 11 Dec 2016 21:13:25 +0000 (22:13 +0100)]
babl: make missing fast path message explicit

Explicit, and mandatory for BABL_UNSTABLE.

9 years agoextensions/cairo: add faster paths for 8bit and 16bit gamma grayscale
Øyvind Kolås [Sun, 11 Dec 2016 18:31:40 +0000 (19:31 +0100)]
extensions/cairo: add faster paths for 8bit and 16bit gamma grayscale

9 years agobabl-fish-path: add debug print message when no fast paths were found
Øyvind Kolås [Sat, 10 Dec 2016 18:41:39 +0000 (19:41 +0100)]
babl-fish-path: add debug print message when no fast paths were found

Messages get printed when the environment variable BABL_DEBUG_CONVERSIONS is
set, which also inhibits loading of babl fish cache.

9 years agoextensions/add shorter fast path for half gray
Øyvind Kolås [Sat, 10 Dec 2016 15:27:08 +0000 (16:27 +0100)]
extensions/add shorter fast path for half gray

9 years agoextensions/simple: improve u16 fast paths
Øyvind Kolås [Sat, 10 Dec 2016 15:10:45 +0000 (16:10 +0100)]
extensions/simple: improve u16 fast paths

9 years agoextensions/simple: add u16 fast paths
Øyvind Kolås [Fri, 9 Dec 2016 21:21:48 +0000 (22:21 +0100)]
extensions/simple: add u16 fast paths

9 years agoextensions/simple: reuse some fast paths for more component counts
Øyvind Kolås [Fri, 9 Dec 2016 21:17:15 +0000 (22:17 +0100)]
extensions/simple: reuse some fast paths for more component counts

9 years agoextensions/simple: implement some 32bit integer fast paths
Øyvind Kolås [Fri, 9 Dec 2016 19:07:47 +0000 (20:07 +0100)]
extensions/simple: implement some 32bit integer fast paths

9 years agoextensions: speed up 8bit gray scale for GIMP
Øyvind Kolås [Fri, 9 Dec 2016 13:26:31 +0000 (14:26 +0100)]
extensions: speed up 8bit gray scale for GIMP

9 years agoextensions/16bit: add a couple 16 bit alpha adding fast paths
Øyvind Kolås [Thu, 8 Dec 2016 19:03:27 +0000 (20:03 +0100)]
extensions/16bit: add a couple 16 bit alpha adding fast paths

9 years agobabl-cache: implement a better cache path on Win32
Edward E [Fri, 2 Dec 2016 00:39:11 +0000 (18:39 -0600)]
babl-cache: implement a better cache path on Win32

Use SHGetFolderPathA() to get the user local data path
(the same path GEGL uses for plugins on Win32)

https://bugzilla.gnome.org/show_bug.cgi?id=774491

9 years agobabl-cache: fix mk_ancestry to return 0 when behaving properly
Øyvind Kolås [Wed, 30 Nov 2016 00:43:45 +0000 (01:43 +0100)]
babl-cache: fix mk_ancestry to return 0 when behaving properly

9 years agobabl-cache: use babl version in header for releases
Øyvind Kolås [Tue, 29 Nov 2016 21:53:13 +0000 (22:53 +0100)]
babl-cache: use babl version in header for releases

9 years agobabl-cache: factor out construction of header line
Øyvind Kolås [Tue, 29 Nov 2016 21:45:56 +0000 (22:45 +0100)]
babl-cache: factor out construction of header line

9 years agopost release version bump
Øyvind Kolås [Tue, 29 Nov 2016 21:16:17 +0000 (22:16 +0100)]
post release version bump

9 years agoconfigure.ac: 0.1.22 release
Øyvind Kolås [Tue, 29 Nov 2016 21:04:31 +0000 (22:04 +0100)]
configure.ac: 0.1.22 release

9 years agorename define for default BABL_TOLERANCE to match envvar
Øyvind Kolås [Mon, 28 Nov 2016 11:14:45 +0000 (12:14 +0100)]
rename define for default BABL_TOLERANCE to match envvar

9 years agobabl-cache: just some styling fix.
Jehan [Thu, 24 Nov 2016 03:31:49 +0000 (04:31 +0100)]
babl-cache: just some styling fix.

Saw some light, and some trailing whitespaces, or some indentation
not following the usual styling, and I fixed it.

9 years agobabl, babl-cache: enable cache write, fix cache path processing
Edward E [Wed, 23 Nov 2016 22:33:29 +0000 (16:33 -0600)]
babl, babl-cache: enable cache write, fix cache path processing

1. babl.c/babl_exit(): Remove fixme to enable babl cache writing on windows.
2. babl-cache.c/mk_ancestry(): pass the modified path to mk_ancestry_iter().

9 years agobabl-verify: fix win32 compile, with s/setenv/putenv/g
Edward E [Wed, 23 Nov 2016 20:35:39 +0000 (14:35 -0600)]
babl-verify: fix win32 compile, with s/setenv/putenv/g

Wouldn't compile on windows because putenv() takes 1 arg, not 2.
Win32 has no setenv(), pippin said try using putenv() on all platforms.

9 years agobabl-cache: use clearer arithmetic for dropping 1% of cached fishes
Øyvind Kolås [Wed, 23 Nov 2016 19:45:43 +0000 (20:45 +0100)]
babl-cache: use clearer arithmetic for dropping 1% of cached fishes

9 years agobabl-cache: incorporate BABL_PATH_LENGTH in header
Øyvind Kolås [Wed, 23 Nov 2016 10:36:28 +0000 (11:36 +0100)]
babl-cache: incorporate BABL_PATH_LENGTH in header

9 years agobabl-cache: rearrange per fish data
Øyvind Kolås [Wed, 23 Nov 2016 10:28:24 +0000 (11:28 +0100)]
babl-cache: rearrange per fish data

9 years agobabl-cache: remove win32 bail at start of loading code
Øyvind Kolås [Tue, 22 Nov 2016 21:53:36 +0000 (22:53 +0100)]
babl-cache: remove win32 bail at start of loading code

9 years agobabl-cache: Add a #define for FALLBACK_CACHE_PATH
Edward E [Tue, 22 Nov 2016 19:50:34 +0000 (20:50 +0100)]
babl-cache: Add a #define for FALLBACK_CACHE_PATH

Also return fallback cache path if failing to create location for constructed
path.

9 years agomk_ancestry: propagate return value
Øyvind Kolås [Tue, 22 Nov 2016 19:44:37 +0000 (20:44 +0100)]
mk_ancestry: propagate return value

9 years agobabl-verify: make it compile on win32, by making setenv use putenv
Øyvind Kolås [Mon, 21 Nov 2016 12:44:51 +0000 (13:44 +0100)]
babl-verify: make it compile on win32, by making setenv use putenv

9 years agobabl-cache: expect newline trouble on win32
Øyvind Kolås [Mon, 21 Nov 2016 12:42:55 +0000 (13:42 +0100)]
babl-cache: expect newline trouble on win32

9 years agofish_cache_path(): simplify through use stack instead of heap
Øyvind Kolås [Sun, 20 Nov 2016 21:39:05 +0000 (22:39 +0100)]
fish_cache_path(): simplify through use stack instead of heap

9 years agobabl-cache: use getenv("TEMP") for folder location on win32, and fix mk_ancestry
Øyvind Kolås [Sun, 20 Nov 2016 17:17:52 +0000 (18:17 +0100)]
babl-cache: use getenv("TEMP") for folder location on win32, and fix mk_ancestry

Inspired by initial work in patch for bug 774491 provided by Edward E

9 years agofast-float: tweak precision so that float->8bit tests pass without issue
Øyvind Kolås [Sun, 20 Nov 2016 13:36:46 +0000 (14:36 +0100)]
fast-float: tweak precision so that float->8bit tests pass without issue

9 years agobabl-cache: avoid %'ing by 0
Øyvind Kolås [Sun, 20 Nov 2016 12:28:43 +0000 (13:28 +0100)]
babl-cache: avoid %'ing by 0

9 years agobabl-verify: set a high tolerance, avoid censoring some underperforming fast paths
Øyvind Kolås [Sun, 20 Nov 2016 11:36:36 +0000 (12:36 +0100)]
babl-verify: set a high tolerance, avoid censoring some underperforming fast paths

9 years agotwo-table: add RGBA float to R'G'B'A u8
Øyvind Kolås [Sat, 19 Nov 2016 19:08:28 +0000 (20:08 +0100)]
two-table: add RGBA float to R'G'B'A u8

9 years agofast-float: add RGBA float to R'G'B'A u8
Øyvind Kolås [Sat, 19 Nov 2016 19:08:16 +0000 (20:08 +0100)]
fast-float: add RGBA float to R'G'B'A u8

9 years agomake pow implementations inlineable - gaining some fixed amount of blitting performance
Øyvind Kolås [Sat, 19 Nov 2016 17:27:06 +0000 (18:27 +0100)]
make pow implementations inlineable - gaining some fixed amount of blitting performance

9 years agofast-float: fix regression introduced when reindenting
Øyvind Kolås [Sat, 19 Nov 2016 18:38:14 +0000 (19:38 +0100)]
fast-float: fix regression introduced when reindenting

9 years agoremove babl-fish-stats
Øyvind Kolås [Sat, 19 Nov 2016 18:22:10 +0000 (19:22 +0100)]
remove babl-fish-stats

9 years agogegl-fixups: indentation
Øyvind Kolås [Sat, 19 Nov 2016 17:50:27 +0000 (18:50 +0100)]
gegl-fixups: indentation

9 years agofast-float: indentation
Øyvind Kolås [Sat, 19 Nov 2016 17:50:11 +0000 (18:50 +0100)]
fast-float: indentation

9 years agoremove bablfishpath
Øyvind Kolås [Sat, 19 Nov 2016 17:14:11 +0000 (18:14 +0100)]
remove bablfishpath

9 years agocairo: reorder memory reads to be linear
Øyvind Kolås [Sat, 19 Nov 2016 14:29:48 +0000 (15:29 +0100)]
cairo: reorder memory reads to be linear

9 years agofast-float: improve memory access order
Øyvind Kolås [Sat, 19 Nov 2016 14:21:20 +0000 (15:21 +0100)]
fast-float: improve memory access order

9 years agoremove babl_process_cost
Øyvind Kolås [Sat, 19 Nov 2016 14:01:14 +0000 (15:01 +0100)]
remove babl_process_cost

9 years agoextension/fast-float: gain some speed by ignoring a couple high mantissa bits
Øyvind Kolås [Sat, 19 Nov 2016 12:29:36 +0000 (13:29 +0100)]
extension/fast-float: gain some speed by ignoring a couple high mantissa bits

9 years agoextensions/cairo: remove ; now unused; LUT
Øyvind Kolås [Sat, 19 Nov 2016 12:28:35 +0000 (13:28 +0100)]
extensions/cairo: remove ; now unused; LUT

9 years agofast-float: make float to cairo conversion take clipping into account
Øyvind Kolås [Sat, 19 Nov 2016 11:07:40 +0000 (12:07 +0100)]
fast-float: make float to cairo conversion take clipping into account

9 years agobabl-fish-path: add some specific conversion targeted debug info
Øyvind Kolås [Wed, 16 Nov 2016 19:34:05 +0000 (20:34 +0100)]
babl-fish-path: add some specific conversion targeted debug info

9 years agotools: add babl-verify start of an development aid when improving fast paths
Øyvind Kolås [Wed, 16 Nov 2016 19:40:58 +0000 (20:40 +0100)]
tools: add babl-verify start of an development aid when improving fast paths

This tool take the names of source/target formats - and prints error/cost for
all direct conversions matching arguments.

9 years agofast-float: implement linear interpolation in LUT
Øyvind Kolås [Fri, 18 Nov 2016 22:38:12 +0000 (23:38 +0100)]
fast-float: implement linear interpolation in LUT

9 years agoextensions/gggl-lies: bump up accuracy of a conversion
Øyvind Kolås [Thu, 17 Nov 2016 12:09:54 +0000 (13:09 +0100)]
extensions/gggl-lies: bump up accuracy of a conversion

9 years agofast-float: use higher accuracy LUTs and rework some alpha handling
Øyvind Kolås [Wed, 16 Nov 2016 21:39:17 +0000 (22:39 +0100)]
fast-float: use higher accuracy LUTs and rework some alpha handling

9 years agocairo: pad with 255 instead of copy of color for 24bit format
Øyvind Kolås [Wed, 16 Nov 2016 22:52:26 +0000 (23:52 +0100)]
cairo: pad with 255 instead of copy of color for 24bit format

9 years agocairo: slight improvements to speed and accuracy
Øyvind Kolås [Wed, 16 Nov 2016 22:19:46 +0000 (23:19 +0100)]
cairo: slight improvements to speed and accuracy

9 years agoextensions/cairo: remove some arithmetic
Øyvind Kolås [Wed, 16 Nov 2016 22:11:15 +0000 (23:11 +0100)]
extensions/cairo: remove some arithmetic

9 years agochange default BABL_TOLERANCE to 0.000006
Øyvind Kolås [Wed, 16 Nov 2016 19:36:57 +0000 (20:36 +0100)]
change default BABL_TOLERANCE to 0.000006

This makes the cairo.so extensions fast path for RGBA float blitting to be
accepted. This makes conversions with internal quantization of roughly 16bit be
accepted.

9 years agoextensions/cairo: replace hard-coded LUT with runtime LUT
Øyvind Kolås [Wed, 16 Nov 2016 18:27:28 +0000 (19:27 +0100)]
extensions/cairo: replace hard-coded LUT with runtime LUT

The LUT needed recomputation anyways, doing it at runtime permits easier
tweaking. This results in better precision for the fast path than the
existing table.

9 years agoadd single precision versions of linear/gamma conversions
Øyvind Kolås [Wed, 16 Nov 2016 16:42:33 +0000 (17:42 +0100)]
add single precision versions of linear/gamma conversions

9 years agofast-float: tweak lut generation
Øyvind Kolås [Wed, 16 Nov 2016 16:12:50 +0000 (17:12 +0100)]
fast-float: tweak lut generation

9 years agobabl-cache: attempt to make things barely compile on win32
Øyvind Kolås [Tue, 15 Nov 2016 22:51:44 +0000 (23:51 +0100)]
babl-cache: attempt to make things barely compile on win32

9 years agostore cached fishes in ~/.cache/babl
Øyvind Kolås [Tue, 15 Nov 2016 16:02:10 +0000 (17:02 +0100)]
store cached fishes in ~/.cache/babl

Still no fish cache path solution for win32

9 years agobabl-cache: remove unneeded switch
Øyvind Kolås [Tue, 15 Nov 2016 14:50:52 +0000 (15:50 +0100)]
babl-cache: remove unneeded switch

9 years agoreduce default max babl path to 3
Øyvind Kolås [Tue, 15 Nov 2016 14:47:58 +0000 (15:47 +0100)]
reduce default max babl path to 3

Big decrease in combinatorial explosion of search - missing out on some big
fish.

9 years agobabl-cache: add a 1% probability of cached conversions being dropped on load
Øyvind Kolås [Tue, 15 Nov 2016 13:50:01 +0000 (14:50 +0100)]
babl-cache: add a 1% probability of cached conversions being dropped on load

9 years agobabl-cache: store tolerance as part of cache versioning
Øyvind Kolås [Tue, 15 Nov 2016 13:22:48 +0000 (14:22 +0100)]
babl-cache: store tolerance as part of cache versioning

9 years agomove fish cache to own .c file
Øyvind Kolås [Tue, 15 Nov 2016 12:05:28 +0000 (13:05 +0100)]
move fish cache to own .c file